<?php
  class message extends add_module{  	private $class="message";
  	private $func="put";

  	  function _put_standby($side){         $data=$this->model->returnForStandby($side);        print_r($data);

  	   }

  	   function _put_schedule(){

         return $data;

  	   }

  	   protected function put_options(){  	   	return "start options";
  	   }

   		function put($name){   		 $id=$this->model->get_info("id","ns_tree","name",$name);
   		 $arg['text']=$this->model->get_doc($id);   		 $side=$this->model->get_info("side","ns_tree","id",$id);
   		 $data[$side]=$this->_call_out_func("tree","return_menu",$name,$side);
   		 foreach($arg['text'] as $key=>$value)
   		 {$value['names']=$name;
         $data[$value['side_for_doc']].=$this->view->view("templates/site/tpl_module/dv/dv.tpl",$value+$this->lang,true);
         }   		return	$data;
   		}

   		protected function _edit($id,$lang){   			$data['side']=$this->model->returnSide();   			$data['doc']=$this->model->getDoc($id,$lang);         return $this->view->view("templates/admin_modules/dv/edit/edit.tpl",$data+$this->lang,true);
   		}

   		function _create($father_id,$post){   		$data['lang_arr']=$this->_call_out_func("lang","return_all_lang_array",array());
   		$data['lastInsert']=$this->_call_out_func("lang","return_last_Ilang",array());   		$data['id']=$this->model->insert($this->class,$this->func,$father_id,$data['lang_arr'],$data['lastInsert']['id']);         $data['side']=$this->model->returnSide();   		 return $this->view->view("templates/admin_modules/message/create/create.tpl",$data+$this->lang,true);
   		}

   		function _update($id){   		$this->security($_POST,"",200);   		$this->model->update($id,$_POST);
   		header("location: /".ADMIN_DIR."/message/ok");
   		}

   		function _del($id,$lang=""){   		$this->model->del($id,$lang);
   		}


   		function __call($method, $params){   		return $this->show_404($method, $params);
   		}



   		function _returnPath($module,$func,$link){          return $module."/".$link;
   		}

   		function _returnNLink($id){         //return $this->model->get_text($id);
   		}

   		function _returnLink($id,$lang){   		//return $this->model->get_text2($id,$lang);
   		}





  }
?>